
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML>
<html>
<head>

    <title>活动管理</title>
    <%@ include file="/common/include-core.jsp" %>
    <%@ include file="/common/jspTemplate.jsp" %>
    <script type="text/javascript" src="/static/js/web/activity/getActivityList.js"></script>
    <style type="text/css">
        table{
            table-layout:fixed;/* 只有定义了表格的布局算法为fixed，下面td的定义才能起作用。 */
        }
        td{
            width:100%;
            word-break:keep-all;/* 不换行 */
            white-space:nowrap;/* 不换行 */
            overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
            text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ；需与overflow:hidden;一起使用。*/
        }
    </style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 活动管理 <span class="c-gray en">&gt;</span> 活动管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <form action="/admin/activity/getActivityList.html" method="post" id="searchForm">
            <input type="hidden" id="count" value="${pageInfo.total }" />
            <input type="hidden" id="page" name="page" value="${pageInfo.pageNum }" />
            <input type="hidden" id="pageSize" name="pageSize" value="${pageInfo.pageSize }" />
            <input type="text" name="activityName"  value="${bean.activityName }" placeholder=" 请输入你要查询的活动名称" style="width:250px" class="input-text">
            <span>状态：</span>
            <span class="select-box inline">
                <select name="businessType" class="select">
                    <option value="" ${bean.businessType==""?"selected":"" }>--全部--</option>
                    <option value="1" ${bean.businessType=="1"?"selected":"" }>课程</option>
                    <option value="2" ${bean.businessType=="2"?"selected":"" }>活动报名</option>
                    <option value="3" ${bean.businessType=="3"?"selected":"" }>星品通</option>
                    <option value="5" ${bean.businessType=="5"?"selected":"" }>卡券</option>
                    <option value="6" ${bean.businessType=="6"?"selected":"" }>旅游</option>
                    <option value="7" ${bean.businessType=="7"?"selected":"" }>星艺优品</option>
                </select>
            </span>
            <button name="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="layerTools.layerShowFullScreen('新增产品名称','/admin/activity/activity.html','')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增活动</a></span> <%--<span class="r">共有数据：<strong>54</strong> 条</span> --%></div>
    <div class="mt-20 portfolio-content">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">
                <th>活动名称</th>
                <th>活动类型</th>
                <th>优惠类型</th>
                <th>价格范围</th>
                <th>活动页面地址</th>
                <th>二维码地址</th>
                <th>开始时间</th>
                <th>结束时间</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${pageInfo.list}" var="item" varStatus="index">
                <tr class="text-c">
                    <td>${item.activityName}</td>
                    <td>
                        <c:if test="${item.activityType==2}">
                            活动/比赛
                        </c:if>
                        <c:if test="${item.activityType==3}">
                            招募
                        </c:if>
                        <c:if test="${item.activityType==1}">
                          优惠活动
                        </c:if>
                        <c:if test="${item.activityType==7}">
                          活动券领取活动
                    </c:if>
                    </td>
                    <td>
                        <c:if test="${item.discountsType==1}">
                            减少
                        </c:if>
                        <c:if test="${item.discountsType==2}">
                            减到
                        </c:if>
                    </td>
                    <%--<td>${item.price}</td>--%>
                    <td title="<fmt:formatNumber type="number" value="${item.price/100 } " maxFractionDigits="2"/>">
                        <fmt:formatNumber type="number" value="${item.price/100 } " maxFractionDigits="2"/>
                    </td>
                    <td>${item.activityUrl}</td>
                  <%--  <td>${item.sourceQrCode}</td>--%>
                    <td>
                        <div class="portfoliobox">
                            <div class="picbox">
                                <a href="${picPath}/${item.sourceQrCode}" data-lightbox="gallery">
                                    <img src="${picPath}/${item.sourceQrCode}" width="100" height="100">
                                </a>
                            </div>
                        </div>
                    </td>
                    <td><fmt:formatDate value="${item.startDate}" pattern="yyyy-MM-dd"/></td>
                    <td><fmt:formatDate value="${item.endDate}" pattern="yyyy-MM-dd"/></td>
                    <td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd"/></td>
                    <td class="td-manage">
                       <%-- <c:if test="${item.check==1}">
                            <a style="text-decoration:none" onClick="picture_stop(this,'${item.id}')" href="javascript:;" title="下架">
                                <i class="Hui-iconfont">&#xe6de;</i>
                            </a>
                        </c:if>
                        <c:if test="${item.check==0 or item.check==-1}">
                            <a style="text-decoration:none" onClick="picture_start(this,'${item.id}')" href="javascript:;" title="发布">
                                <i class="Hui-iconfont">&#xe603;</i>
                            </a>
                        </c:if>--%>
                         <a style="text-decoration:none" class="ml-5" onClick="picture_edit('活动编辑','/admin/activity/activity.html?tid=${item.tid}','')"
                           href="javascript:;" title="活动编辑"><i class="Hui-iconfont">&#xe6df;</i></a>
                         <a style="text-decoration:none" class="ml-5" onclick="setActivityProduct(${item.tid});"
                           href="javascript:;" title="产品设置"><i class="Hui-iconfont">&#xe63c;</i></a>
                         <a style="text-decoration:none" class="ml-5" onclick="showActivityProductEntity(${item.tid});"
                           href="javascript:;" title="已关联产品"><i class="Hui-iconfont">&#xe725;</i></a>
                         <a style="text-decoration:none" class="ml-5" onClick="twoDimensionCode(${item.tid},'${item.activityName}','${item.activityUrl}')"
                          href="javascript:;" title="生成二维码"><i class="Hui-iconfont">&#xe610;</i></a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div class="ui-page tr mt10" style="float: right;margin-top: 10px;margin-bottom: 10px"></div>
    </div>
</div>
<%@ include file="/common/include-footer.jsp" %>
</body>
</html>